"""
讲师:caoyan
日期：2022/8/26 16:26
"""
import os
import time
import unittest

from HTMLTestRunner import HTMLTestRunner

if __name__ == '__main__':
   suite =  unittest.defaultTestLoader.discover(start_dir=os.getcwd()+r"\scripts",pattern="test01_login_case.py")
   report = os.getcwd()+r"\report\reprot-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))
   files = open(report,"wb")
   r = HTMLTestRunner.HTMLTestRunner(stream=files,title="A3MALL测试报告",verbosity=2,description="描述")
   r.run(suite)
   files.close()